/////////////////////////////////////////////////////////////////////////////
/*/	
 *	Creator:		Joshua C. Rouzer
 *	Title:			Base Unit Header
 *	Last Edited:	06/14/2013
 *	Summary:		Additional variables to set up base units
/*/
/////////////////////////////////////////////////////////////////////////////
#ifndef CBASEUNIT_H
#define CBASEUNIT_H
#include "MovingObject.h"
#include "Waypoint.h"
#include "DefenseStruct.h"


class CBaseUnit : public CMovingObject{
	float m_fHealth;
	float m_fMaxHealth;
	float m_fAttackCooldown;
	float m_fSpecAttCooldown;
	float m_fAttackWait;
	float m_fSAttackWait;
	float m_fBaseDamage;
	float m_fSpecialDamage;

	int m_nRange;

	int ShotID;
	int DeathID;

	CBaseClass *m_pTarget;
	CWaypoint* m_cCurWaypoint;

	

public:
	CBaseUnit();
	CBaseUnit(float fHealth, float fAttCool, float fSAttCool, float fBaseDmg, float fSpDmg);
	virtual ~CBaseUnit();
	virtual void Update(float dT);
	virtual void Render();

	void  SetHealth		(float fHealth)		{m_fHealth = fHealth;}
	void  SetMaxHealth	(float fMHealth)	{m_fMaxHealth = fMHealth;}
	void  SetAttackCool	(float fAttack)		{m_fAttackCooldown = fAttack;}
	void  SetSpecAttCool(float fSAttack)	{m_fSpecAttCooldown = fSAttack;}
	void  SetAttackWait	(float fWait)		{m_fAttackWait = fWait;}
	void  SetSAttackWait(float fSWait)		{m_fSAttackWait = fSWait;}
	void  SetBaseDmg	(float fBaseDmg)	{m_fBaseDamage = fBaseDmg;}
	void  SetSpecialDmg	(float fSpecialDmg)	{m_fSpecialDamage = fSpecialDmg;}
	void  SetTarget		(CBaseClass *enemy)	{m_pTarget = enemy;}
	void  SetWaypoint	(CWaypoint* waypoint){m_cCurWaypoint = waypoint;}
	void  SetRange		(int nRange)		{m_nRange = nRange;}
	void  SetDeathID	(int SoundID)		{DeathID = SoundID;}
	void  SetShotID		(int SoundID)		{ShotID = SoundID;}


	float GetHealth		()	{return m_fHealth;}
	float GetMaxHealth	()	{return m_fMaxHealth;}
	float GetAttackCool	()	{return m_fAttackCooldown;}
	float GetSpecAttCool()	{return m_fSpecAttCooldown;}
	float GetAttackWait	()	{return m_fAttackWait;}
	float GetSAttackWait()	{return m_fSAttackWait;}
	float GetBaseDmg	()	{return m_fBaseDamage;}
	float GetSpecialDmg	()	{return m_fSpecialDamage;}
	CBaseClass *GetTarget()	{return m_pTarget;}
	CWaypoint*  GetWaypoint(){return m_cCurWaypoint;}
	int GetRange		()	{return m_nRange;}
	int GetDeathID		()	{return DeathID;}
	int GetShotID		()	{return ShotID;}


	CAnimInfo* GetInfo	()	{return AnimationInfo;}
	CAnchorPointAnimation* GetCurrAnim() {return CurrAnim;}

	std::vector<CBaseUnit*> GetEnemiesInRange();
	CDefenseStruct* GetClosestGate();
};

#endif